package idservice.controllers;

/**
 * Created by liwei.b on 2016/12/15.
 */

import idservice.common.IdWorker;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Id")
public class IdController {
    private IdWorker idWorker = new IdWorker(0, 0);

    @RequestMapping("/New")
    public long New() {
        return idWorker.nextId();
    }
}
